package io.lvdaxian.handwriting.lambda;

import org.junit.Test;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * filter 测试案例
 *
 * @author lihh
 */
public class FilterTest {
  
  @Test
  public void test001() {
    List<Integer> counts = Stream.of(1, 2, 3, 4).filter(idx -> idx % 2 == 0).collect(Collectors.toList());
    counts.forEach(System.out::println);
  }
}
